package org.jet.emall.rbac.transfer;

import org.jet.emall.rbac.dto.AdminMenuDTO;
import org.jet.emall.rbac.po.AdminMenu;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @author xiaozai
 * @version 1.0
 * @date 2020-04-05 11:16
 */
@Mapper
public interface AdminMenuDtoTransfer {
    AdminMenuDtoTransfer INSTANCE = Mappers.getMapper(AdminMenuDtoTransfer.class);

    /**
     * 将PO转DTO
     * @param adminMenu
     * @return
     */
    @Mapping(target = "children",ignore = true)
    AdminMenuDTO toDto(AdminMenu adminMenu);

}
